package guda.mrpc.core.serialize;

/**
 * Created by well on 17/5/23.
 */
public interface ObjectSerialize {

    int MESSAGE_LENGTH = 4;

    <T> byte[] serialize(T obj) throws Exception;

    <T> T deserialize(byte[] data, Class<T> clazz) throws Exception;
}
